function model = fs_train(feat_train, score_train, train_method, predict_method )

sel_n = 15;

avg_n = 1;

train_rate = 0.8;

dim = size(feat_train ,2);

data_n = size(feat_train,1);

train_n = floor( train_rate * data_n );

bo = zeros(1, dim );
sel_id = [];

warning off 
for i = 1:sel_n    
    
    disp([ num2str(i) ' / ' num2str( sel_n ) ] )
    
    epoch_score = -ones( 1, dim ) * 10000;
    
    for j = 1:avg_n
    
        
        dim_sel = randperm(size(score_train,2) );
        dim_sel = dim_sel(1: floor( size(score_train,2) / 3));
        
        ord = randperm( data_n );
        temp_feat_train = feat_train( ord(1:train_n)        , : );
        temp_feat_test  = feat_train( ord(1+train_n : end)  , : );
        temp_lab_train = score_train( ord(1:train_n)        , dim_sel );
        temp_lab_test  = score_train( ord(1+train_n : end)  , dim_sel );
        
        for cand_id = 1:dim
            if(bo(cand_id)==1)
                epoch_score(cand_id) = epoch_score(cand_id) -2000;
            end
            if(bo(cand_id)==0)
                if(mod(cand_id, 20)==0)
                    disp(['  ' num2str(cand_id) ' / ' num2str( dim ) ] )
                end
        
                sel_temp = [sel_id cand_id];
                mod_temp = train_method( temp_feat_train(:, sel_temp),  ...
                                         temp_lab_train );
                temp_res = predict_method(  mod_temp,...
                                            temp_feat_test(:, sel_temp) );
                                        
                if(isnan(mean(mean(temp_res))))
                    mse = -1000;
                else                                                                              
                    mse = - mean(mean(abs( temp_res - temp_lab_test)));
                end
                    
                epoch_score(cand_id) = epoch_score(cand_id) + mse;
            end
        end
    end
    
    max(epoch_score)
    
    %pause()
    [~, best_cand] = max( epoch_score );
    best_cand = best_cand(1);
    
    sel_id = [sel_id best_cand]
    bo(sel_id) = 1;            
end

warning on

model.sel_id = sel_id;
model.mod = train_method( feat_train( :, sel_id) , score_train );